package ooday02;

public class Student extends Person {
    public String className;
    public String stuId;
    //int a;
    //构造方法

    public Student() {
    }

    public Student(String className, String stuId,String name,int age,String address) {
        super(name,age,address);

        this.className = className;
        this.stuId = stuId;

        //this.a=5;
        //a=6;
        //super.a=5;
        //a=9;
    }

    public void study(){
        System.out.println("学生"+name+"学习");
    }
    public  void sayHi(){
        System.out.println("大家好，我是"+name+"，今年"+age+"岁了"+"，来自"+address+"所在班级"+className+"，学号是"+stuId+"。");
    }
}
